﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp2
{
    //可以在CookRobot中添加一个代表菜的类型的字段，用枚举类型；在DeliveryRobot中添加一个代表连续工作时长的字段hours。
    //CookRobot和DeliveryRobot应实现具体的Working()方法。
    enum Cai
  { 
        菠菜,
        黄瓜,
        土豆
    }
    class CookRobot : Robot
    {
        private Cai caiming;
        public Cai Caiming
        {
            get { return this.caiming; }
            set { this.caiming = value; }
        }
        public CookRobot(string name, Cai caiming) : base(name)
        {
            this.caiming = caiming;
        }

        public override void Working()
        {
            Console.WriteLine("{0}炒{1}",this.name,this.caiming);
        }
    }
}
